#include <iostream>

template<typename T>

class MyTemplate{

private:
    T data;

public:
    MyTemplate(T d): data(d){}

    T getdata(){
        return data;
    }

};

template <typename T>
T add(T a,T b){

    return a+b;
}

int main(){

    MyTemplate<int> a(100);
    std::cout << "a= " << a.getdata() << std::endl;

    MyTemplate<std::string> str("hello,template");
    std::cout << "str= " << str.getdata() << std::endl;
    std::cout << std::endl;

    int x = 10;
    int y = 20;

    std::cout << "x= 10,y= 20,ret =" << add(x,y) << std::endl;

    double i = 10.5;
    double j = 21.6;
    std::cout << "i = 10.5,j = 21.6,ret =" << add(i,j) << std::endl;

    return 0;
}
